<%@page language="C#" validateRequest="false" %>
<%@import namespace="System" %>
<%@import namespace="System.Collections.Generic" %>
<%@import namespace="System.Data" %>

<%@import namespace="My.Data" %>
<%@import namespace="My.Data.Worker" %>


<script runat="server">

    // Page_Load
    protected void Page_Load (object sender, System.EventArgs e)
    {
				// 验证码
				string usrValidCode = My.Convert.ToString( Request.Form["MyValidateCode"] ).Trim().ToLower();
				string sysValidCode = My.Convert.ToString( Session["MyValidateCode"]).Trim().ToLower();
				if( usrValidCode != sysValidCode)
				{	  Response.Write("验证码错误");return;   }	
						    	
    		Response.Cache.SetCacheability(HttpCacheability.NoCache);
        lblExecuteResult.Text = MySystem.WebMain();
        
        Session["MyValidateCode"] = null;   //将验证码过期
    }

    // Page_Error
    protected void Page_Error(object sender, EventArgs e)
    {
         Exception ex = Server.GetLastError();
         if (ex is HttpRequestValidationException)
         {
             Response.Write("请您输入合法字符串。");
             Server.ClearError(); // 要是不ClearError()这个异常会继续传到Application_Error()。
         }
    }

//<!-- 执行成功|执行失败,发生错误|JSON -->
</script>

<asp:literal runat="server" id="lblExecuteResult" />



